/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
import java.util.Scanner;
        import java.util.Set;
        import java.util.*;
        import java.lang.System;



// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    PriorityQueue
    public static void main(String[] args) {
        Set<Character> set = new HashSet<Character>();
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str1 = in.nextLine();
            String str2 = in.nextLine();
            char[] array = str1.toUpperCase().toCharArray();
            char[] array1 = str2.toUpperCase().toCharArray();
            for (int i = 0;i < array.length;i++) {
                set.add(array[i]);
            }
            for (int j = 0;j < array1.length;j++) {
                if (!set.contains(array1[j])) {
                    System.out.print(array1[j]);
                }
            }
        }
    }
}